The present invention relates generally to computer systems, and more particularly to a computer architecture utilizing layered device drivers.
A typical computer includes various physical and logical devices. Each device is typically supported through a device driver. The device driver defines the device (in the case of a logical device), and allows the other components in the computer to utilize the device.
Very often, a number of device drivers are used in combination in a stack configuration. When organized in a stack configuration, a particular device driver consumes services from the device driver below it in the stack and exports services to the device driver above it in the stack. For convenience, each device driver in a device driver stack is referred to as a layered device driver (LDD). Each LDD emulates a device. A LDD xe2x80x9cexportsxe2x80x9d a device to the LDD above it in the device driver stack and xe2x80x9cconsumesxe2x80x9d the device that is exported by the LDD below it in the device driver stack. A LDD is xe2x80x9cboundxe2x80x9d to the LDD below it in the device driver stack.
The U.S. Pat. No. 5,802,364 entitled MET ADEVICE DRIVER RENAME/EXCHANGE TECHNIQUE FOR A COMPUTER SYSTEM INCORPORATING A PLURALITY OF INDEPENDENT DEVICE DRIVERS, issued on Sep. 1, 1998 in the names of Steven T. Senator, Dale R. Passmore, and Robert S. Gittins, which is hereby incorporated by reference in its entirety, describes a LDD architecture for use in a storage device. This patent addresses altering a prior-established driver hierarchy, and describes a LDD architecture in which each LDD is able to operate independently of the other LDDs without knowledge of the private data structures of any of the other LDDs.
LDDs are installed into the computer through a registration process. Briefly, the operating system includes a device driver registration system that enables a LDD to be initialized and installed into the operating system. The user can specify the relative position of each LDD within the device driver stack.
For example, the Windows NT operating system includes an operating system device driver registration system. Specifically, the Windows NT operating system maintains a list of device drivers and their corresponding parameters in the System CurrentControlSet Services file. Using the information in the System CurrentControlSet Services file, the Windows NT operating system loads the device drivers into the operating system in a specified order. Such loading provides for orderly initialization of the device drivers.
One problem with the operating system device driver registration system is that it does not support multiple device driver stacks, which are necessary or desirable in some computer applications. Thus, the operating system device driver registration system does not allow the user to specify a particular device driver stack and a relative position in the device driver stack for each LDD.
Thus, there is a need for a layered device driver registration system that allows the user to specify a particular device driver stack and a relative position in the device driver stack for each LDD is needed, and also allows a layered device driver to be dynamically inserted into or removed from a particular device driver stack.
In accordance with one aspect of the present invention, a layered device driver registration system is used in conjunction with an operating system device driver registration system to enable a user to associate a device driver with one of a number of device driver stacks and to configure the relative position of the device driver within the device driver stack. The layered device driver registration system includes a driver list and a driver order list. In order to install a device driver, the device driver is added to the driver list, and the relative position of the device driver is indicated within the driver order list.
In accordance with another aspect of the invention, a layered device driver is inserted into a device driver stack between an upper device driver and a lower device driver by suspending input/output operations for the device driver stack, unbinding the upper device driver from the lower device driver, binding the new device driver to the lower device driver, binding the upper device driver to the new device driver, and restarting input/output operations for the device driver stack.
In accordance with yet another aspect of the invention, a layered device driver is removed from a device driver stack, and specifically from between an upper device driver and a lower device driver, by suspending input/output operations for the device driver stack, unbinding the upper device driver from the unwanted device driver, unbinding the unwanted device driver from the lower device driver, binding the upper device driver to the lower device driver, and restarting input/output operations for the device driver stack.